home *** CD-ROM | disk | FTP | other *** search
- .TH SRINTER
- 6 "IRIT Version 6.0"
- .SH NAME
- SRINTER
-
-
-
- PointType SRINTER( SurfaceType Srf, PointType RayOrigin,
- VectorType RayDirection )
-
- Computes the first intersection, if any, of the prescribed ray originating
- from RayOrigin in direction RayDirection with surface Srf.
- Returns the intersection point in the parametric space of Srf with
- the U and V coordinates as the X and Y coefficients of the returned value.
- The intersection is computed between the ray and a polygonal approximation
- of the surface Srf as set via the RESOLUTION variable.
-
- Example:
-
- RayOrigin = point( 2, 0.1, 0.3 );
- RayDir = vector( -4, 0, 0 );
-
- RayLine = coerce( RayOrigin, E3 ) + coerce( RayOrigin + RayDir, E3 );
- color( RayLine, magenta );
- attrib( RayLine, "dwidth", 2 );
-
- resolution = 5;
- InterPt = SRINTER( glass, RayOrigin, RayDir );
- InterPtE3 = seval( glass, coord( InterPt, 0 ), coord( InterPt, 1 ) );
- color( InterPtE3, cyan );
- attrib( InterPtE3, "dwidth", 3 );
- view( list( InterPtE3, RayLine, glass, axes ), 1 );
-
- resolution = 80;
- InterPt = SRINTER( glass, RayOrigin, RayDir );
- InterPtE3 = seval( glass, coord( InterPt, 0 ), coord( InterPt, 1 ) );
- color( InterPtE3, cyan );
- attrib( InterPtE3, "dwidth", 3 );
- view( list( InterPtE3, RayLine, glass, axes ), 1 );
-
- A complete example of constructing a ray and intersecting it against a
- surface of a glass at two different resolution, resulting in two different
- accuracies. See also RESOLUTION.
-